// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import VueRespurce from 'vue-resource'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

Vue.use(ElementUI);
Vue.use(VueRespurce);

Vue.prototype.getConfigJson=function(){
  this.$http.get("serverconfig.json").then((result)=>{
      console.log(result);
      //用一个全局字段保存serviceIp  也可以用sessionStorage存储
      Vue.prototype.serviceIp = result.body.serviceIp;
  }).catch((error)=>{console.log(error)});
} 

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})


